package com.tarzan.edu.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.sql.Timestamp;

/**
 * @author liujinshan
 * @title: EduTeacher
 * @projectName com.tarzan.edu.entity
 * @description: TODO 讲师实体
 * @date 2021/5/21 15:29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class EduTeacher extends Model<EduTeacher> {

    private static final long serialVersionUID = 1L;

    /**
     * 讲师主键
     */
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 讲师名称
     */
    private String name;

    /**
     * 讲师简介
     */
    private String intro;

    /**
     * 讲师资历
     */
    private String career;

    /**
     * 讲师等级
     */
    private long level;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 排序
     */
    private long sort;

    /**
     * 逻辑删除
     */
    @TableLogic
    private long isDeleted;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Timestamp createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Timestamp modifiedTime;
}
